﻿<!--
//===============================================================================
// Mammoth
//===============================================================================
// Copyright (C) 2008-2009 Arkadiusz Świerczek and Piotr Włodek. All rights reserved.
//===============================================================================
// Defines user interface for the SplashView.
//===============================================================================
-->

<Window x:Class="WpfRcp.Views.Windows.SplashScreenWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Helpers1="clr-namespace:WpfRcp.Helpers"
        ResizeMode="NoResize"
        ShowInTaskbar="False"
        WindowStartupLocation="CenterScreen"
        AllowsTransparency="True"
        Background="Transparent"
        SizeToContent="WidthAndHeight"
        WindowStyle="None">

    <Window.Resources>
        <Style TargetType="TextBlock">
            <Setter Property="Foreground" Value="White" />
        </Style>

        <Style TargetType="Label" BasedOn="{StaticResource {x:Type Label}}">
            <Style.Triggers>
                <Trigger Property="IsEnabled" Value="True">
                    <Setter Property="TextBlock.Foreground" Value="White" />
                </Trigger>
                <Trigger Property="IsEnabled" Value="False">
                    <Setter Property="TextBlock.Foreground" Value="DarkGray" />
                </Trigger>
            </Style.Triggers>
        </Style>
        
        <BooleanToVisibilityConverter x:Key="booleanToVisibilityConverter" />
    </Window.Resources>

    <Grid>
        <Border BorderBrush="{DynamicResource WindowBorder}" BorderThickness="1" CornerRadius="5">
            <Border CornerRadius="5">
                <Border.Background>
                    <LinearGradientBrush EndPoint="0.455,0.996" StartPoint="0.457,0.038">
                        <GradientStop Color="#FF070E18" Offset="0"/>
                        <GradientStop Color="#FF8B96A3" Offset="1"/>
                    </LinearGradientBrush>
                </Border.Background>
                <DockPanel Margin="10">
                    <StackPanel Orientation="Horizontal">
                        <Image Width="192" Height="192" Source="{Binding RcpSettings.SplashScreenImage}" />
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition />
                            </Grid.RowDefinitions>

                            <StackPanel Grid.Row="0">
                                <Grid Margin="0,20,20,35">
                                    <StackPanel>
                                        <StackPanel Orientation="Horizontal">
                                            <TextBlock FontFamily="Segoe" FontSize="28" FontStretch="Normal"
                                                    FontWeight="Light" TextWrapping="Wrap" Foreground="#FF9C9FA3"
                                                    Text="{Binding RcpSettings.AppName}" />
                                            <TextBlock FontFamily="Segoe" FontSize="28" FontStretch="Normal"
                                                    FontWeight="Light" TextWrapping="Wrap" Foreground="#FFFFFFFF"
                                                    Text="{Binding RcpSettings.AppNameExtended}" Margin="5 0 0 0" />
                                            <TextBlock FontFamily="Segoe" FontSize="14" FontWeight="Normal"
                                                    Foreground="#FF9C9FA3" FontStretch="Normal" TextWrapping="Wrap"
                                                    Text="{Binding RcpSettings.VersionSuffix}" Margin="5 0 0 4"
                                                    VerticalAlignment="Bottom" />
                                        </StackPanel>

                                        <StackPanel Orientation="Horizontal">
                                            <TextBlock FontFamily="Segoe" FontSize="10" FontStretch="Normal" FontWeight="Light" FontStyle="Italic"
                                           TextWrapping="Wrap" Foreground="#FF9C9FA3" Text="Powered by" />
                                            <TextBlock FontFamily="Segoe" FontSize="10" FontStretch="Normal" FontWeight="Light"
                                           TextWrapping="Wrap" Foreground="#FFFFFFFF" Text="Mammoth RCP" Margin="5 0 0 0" />
                                            <TextBlock FontFamily="Segoe" FontSize="10" FontWeight="Normal" Foreground="#FF9C9FA3"
                                           FontStretch="Normal" TextWrapping="Wrap" Text="{Binding RcpVersionString}" Margin="5 0 0 4" VerticalAlignment="Bottom" />
                                        </StackPanel>
                                    </StackPanel>
                                </Grid>

                                <TextBlock Text="{Binding StatusString}" FontWeight="Bold" Visibility="{Binding StatusStringVisible, Converter={StaticResource booleanToVisibilityConverter}}" Margin="0,0,0,15"></TextBlock>
                                <TextBlock Text="{Binding VersionString}"></TextBlock>
                                <TextBlock Text="{Binding RcpSettings.Copyright}" />
                                <TextBlock Text="{Binding Source={x:Static Helpers1:ResHelper.Instance}, Path=Resource[AllRightsReserved], Mode=OneWay}"></TextBlock>
                                <Rectangle Height="1" Stroke="DarkGray" VerticalAlignment="Stretch" Margin="0,10,0,10" />

                            </StackPanel>
                        </Grid>
                    </StackPanel>
                </DockPanel>
            </Border>
        </Border>
    </Grid>

</Window>
